import { DEFAULT_LAYOUT } from "../base"
import { AppRouteRecordRaw } from "../types"

const USER: AppRouteRecordRaw = {
  path: "/system",
  name: "system",
  component: DEFAULT_LAYOUT,
  meta: {
    locale: "menu.system",
    icon: "icon-settings",
    requiresAuth: true,
    order: 8
  },
  children: [
    {
      path: "user",
      name: "User",
      component: () => import("@/views/system/user/index.vue"),
      meta: {
        locale: "角色管理",
        requiresAuth: true,
        roles: ["*"]
      }
    },
    {
      path: "area",
      name: "Area",
      component: () => import("@/views/system/area/index.vue"),
      meta: {
        locale: "辖区管理",
        requiresAuth: true,
        roles: ["*"]
      }
    },
    {
      path: "dictionary",
      name: "Dictionary",
      component: () => import("@/views/system/dictionary/index.vue"),
      meta: {
        locale: "字典管理",
        requiresAuth: true,
        roles: ["*"]
      }
    },
    {
      path: "menu",
      name: "Menu",
      component: () => import("@/views/system/menu/index.vue"),
      meta: {
        locale: "菜单管理",
        requiresAuth: true,
        roles: ["*"]
      }
    },
    {
      path: "email",
      name: "Email",
      component: () => import("@/views/system/email/index.vue"),
      meta: {
        locale: "邮件服务",
        requiresAuth: true,
        roles: ["*"]
      }
    },
    {
      path: "systemSetting",
      name: "SystemSetting",
      component: () => import("@/views/system/systemSetting/index.vue"),
      meta: {
        locale: "系统设置",
        requiresAuth: true,
        roles: ["*"]
      }
    },
    {
      path: "log",
      name: "Log",
      component: () => import("@/views/system/log/index.vue"),
      meta: {
        locale: "审计日志",
        requiresAuth: true,
        roles: ["*"]
      }
    }
  ]
}

export default USER
